Rev 1448 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using BauzoidNET.math;
using BauzoidNET.parser;
namespace BurutaruEditor
.file
{
public class CheckPoint
: LevelObject
{
[TypeConverter
(typeof(ExpandableObjectConverter
))]
public Vector2 Position
{ get
; set
; }
[TypeConverter
(typeof(ExpandableObjectConverter
))]
public Vector2 FreeScroll
{ get
; set
; }
public float ScrollSpeed
{ get
; set
; }
public string ContinueCondition
{ get
; set
; }
public CheckPoint
(Document doc,
string name
)
: base(doc, name
)
{
}
public bool ReadParameter
(Tokenizer t,
string id
)
{
if (id
.Equals("position", StringComparison
.OrdinalIgnoreCase))
{
Position
= ParseUtil
.readVector2(t
);
}
else if (id
.Equals("freeScroll", StringComparison
.OrdinalIgnoreCase))
{
FreeScroll
= ParseUtil
.readVector2(t
);
}
else if (id
.Equals("continueCondition", StringComparison
.OrdinalIgnoreCase))
{
ContinueCondition
= t
.readString();
}
else if (id
.Equals("scrollSpeed", StringComparison
.OrdinalIgnoreCase))
{
ScrollSpeed
= t
.readNumber();
}
else
{
return base.ReadParameter(t, id
);
}
t
.readToken(";");
return true;
}
}
}