Esempio n. 1
0
    public override void EnterScene()
    {
        base.EnterScene();

        if (Data != null)
        {
            Attr.Exp = Data.exp;
            SetLevel(Data.level);
            for (int i = 0; i < Data.skills.Count; i++)
            {
                AddSkill(Data.skills[i]);
            }
            for (int i = 0, len = Data.items.Count; i < len; i++)
            {
                ItemObject item = ActorManager.Instance.Create(Data.items[i], transform.position) as ItemObject;
                if (item != null)
                {
                    item.BePickup(this);
                }
            }
        }
    }