Exemplo n.º 1
0
        void Awake()
        {
            PV                = GetComponent <PhotonView>();
            proxy             = GetComponent <CharacterProxy>();
            movement          = GetComponent <CharacterMovement>();
            fire              = GetComponent <CharacterFire>();
            damage            = GetComponent <CharacterDamage>();
            boosterController = GetComponent <BoosterController>();
            weaponController  = GetComponent <WeaponController>();
            rigidBody         = GetComponent <Rigidbody2D>();
            collider2d        = GetComponent <Collider2D>();

            if (PV.IsMine)
            {
                InitLocal();
            }
            else
            {
                InitProxy();
            }

            PlayerName.Value = PV.Owner.NickName;
            NameChangeEvent.Raise();

            isAlreadyDead = false;
        }
Exemplo n.º 2
0
        void Start()
        {
            CustomTypesSerialization.Register();

            currentBoosters = new List <Booster>();
            proxy           = GetComponent <CharacterProxy>();
            spriteRenderer  = GetComponentInChildren <SpriteRenderer>();
        }
Exemplo n.º 3
0
 void Start()
 {
     FireAllowed.SetValue(false);
     proxy = GetComponent <CharacterProxy>();
     foreach (Animator anim in GetComponentsInChildren <Animator>())
     {
         if (anim.name == "Weapon")
         {
             weaponAnimator = anim;
             break;
         }
     }
 }
Exemplo n.º 4
0
 void Start()
 {
     proxy             = GetComponent <CharacterProxy>();
     boosterController = GetComponent <BoosterController>();
 }