// Use this for initialization void Start() { body = gameObject.GetComponent <Rigidbody2D>(); animator = transform.GetComponent <Animator>(); states = new AnimatorStates(animator, new string[] { "walk", "idle", "jump", "climb", "death", "wall_slide" }); leveller = new Leveller(this, LEVEL_MAP); states.ChangeState("idle"); }
void Start() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); return; } Level = 1; for (int i = 1; i < 10; i++) { //Debug.Log (Instance.DataRequirement * Instance.Scaler * i); } }
public void AddExperience(int value) { Experience += value; Leveller.UpdateExperience(this); }