Пример #1
0
    // 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");
    }
Пример #2
0
    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);
        }
    }
Пример #3
0
 public void AddExperience(int value)
 {
     Experience += value;
     Leveller.UpdateExperience(this);
 }