Пример #1
0
    private void Start()
    {
        player    = GameObject.FindWithTag("Player");
        layerMask = LayerMask.GetMask("Player");
        m         = this.GetComponent <Renderer>().material;
        altezza   = m.GetFloat("Vector1_e13e019d51d54a858419bc043499bafd");

        speedController = player.GetComponent <Invector.vCharacterController.vThirdPersonController>();
    }
        protected override void Start()
        {
            base.Start();
            if (!useInstance)
            {
                return;
            }

            if (instance == null)
            {
                instance = this;
                if (GameObject.Find("GameController") == null)
                {
                    DontDestroyOnLoad(this.gameObject);
                }
                this.gameObject.name = gameObject.name + " Instance";
            }
            else
            {
                Destroy(this.gameObject);
                return;
            }
        }
Пример #3
0
        protected virtual void Start()
        {
            cc = GetComponent <vThirdPersonController>();

            if (cc != null)
            {
                cc.Init();
            }

            if (GameController.Instance.IsMultyPlayer())
            {
                if (!isLocalPlayer)
                {
                    Destroy(this);
                    return;
                }
            }

            StartCoroutine(CharacterInit());

            ShowCursor(showCursorOnStart);
            LockCursor(unlockCursorOnStart);
        }
Пример #4
0
        private void sizeParticle(vThirdPersonController cc)
        {
            float value = cc.currentStamina / cc.maxStamina;

            energy.transform.localScale = new Vector3(value, value, 1);
        }
Пример #5
0
 public void Init(vThirdPersonController cc)
 {
     cc.onDead.AddListener(OnDead);
     cc.onReceiveDamage.AddListener(EnableDamageSprite);
     damageImage.color = new Color(0f, 0f, 0f, 0f);
 }
 protected override void OnEnable()
 {
     base.OnEnable();
     tp = (vThirdPersonController)target;
     _capsuleCollider = tp.GetComponent <CapsuleCollider>();
 }