示例#1
0
 // Use this for initialization
 private void Awake()
 {
     GameController.GetInstance().SetPlayerScript(this);
     mMainCamera = Camera.main;
     mAbilities  = new GameObject[6];
     AbilityDatabase.GetInstance().GetAbility(0).GetComponent <Projectile>().mSpawnPosition  = transform;
     AbilityDatabase.GetInstance().GetAbility(0).GetComponent <Projectile>().mSpawnDirection = mCrosshair.transform;
     mAbilities[0] = Instantiate(AbilityDatabase.GetInstance().GetAbility(0), gameObject.transform);
     mAbilities[1] = Instantiate(AbilityDatabase.GetInstance().GetAbility(1), gameObject.transform);
     mAbilities[2] = Instantiate(AbilityDatabase.GetInstance().GetAbility(2), gameObject.transform);
     mAbilities[3] = Instantiate(AbilityDatabase.GetInstance().GetAbility(3), gameObject.transform);
     mAbilities[4] = Instantiate(AbilityDatabase.GetInstance().GetAbility(4), gameObject.transform);
     mAbilities[5] = Instantiate(AbilityDatabase.GetInstance().GetAbility(5), gameObject.transform);
 }