Example #1
0
    // Use this for initialization


    void Start()
    {
        minionMonster = new MonsterInformation();
        minionMonster.basecharacterinformation = new BaseCharacterInformation();

        minionMonster.basecharacterinformation.SetHP(10);
        minionMonster.basecharacterinformation.SetDamage(2);

        minionMonster.basecharacterinformation.SetPostion(new Vector3(Random.Range(-2.5f, 2.5f), 1.5f, Random.Range(-2.5f, 2.5f)));
        transform.position = minionMonster.basecharacterinformation.GetPostion();

        drawBar = GameObject.Find("Canvas").GetComponent <DrawBar>();
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     //heroInformation = Resources.Load("Script/Hero/Heroinformation", typeof(HeroInformation)) as HeroInformation;
     time            = 0;
     player          = GetComponent <Transform>();
     heroInformation = new HeroInformation();
     heroInformation.baseCharacterInformation = new BaseCharacterInformation();
     heroInformation.SetJumpSpeed(200);
     heroInformation.baseCharacterInformation.SetDamage(5);
     heroInformation.baseCharacterInformation.SetHP(100);
     heroInformation.baseCharacterInformation.SetMoveSpeed(10);
     drawBar = GameObject.Find("Canvas").GetComponent <DrawBar>();
     heroInformation.baseCharacterInformation.anim = GetComponent <Animator>();
     heroInformation.rigidbody = GetComponent <Rigidbody>();
 }