Пример #1
0
        void Start()
        {
            sound    = GetComponent <MultiSound>();
            movement = movementContainer.GetComponent <IMoveAndRotate>();

            Invoke(nameof(RequestStep), nextStepDelay);
        }
Пример #2
0
        private void Start()
        {
            sound = GetComponent <MultiSound>();
            //ground = GetComponent<GroundCheck>();
            movement = movementContainer.GetComponent <IMoveAndRotate>();

            Invoke("RequestStep", nextStepDelay);
        }
Пример #3
0
    private void SwitchOn()
    {
        lightOnObj.SetActive(true);
        lightOffObj.SetActive(false);

        //audio
        MultiSound msnd = GetComponent <MultiSound>();

        if (msnd != null)
        {
            msnd.playSound(0);
        }
    }
Пример #4
0
 void Start()
 {
     // Animator
     anim             = GetComponent <Animator> ();
     col              = GetComponent <CapsuleCollider> ();
     rb               = GetComponent <Rigidbody> ();
     orgColHight      = col.height;
     orgVectColCenter = col.center;
     sounds           = GetComponent <MultiSound>();
     isRun            = false;
     isStart          = false;
     Invoke("StartGame", 6f);
 }
Пример #5
0
    private void CloseDoor()
    {
        openObj.SetActive(false);
        closedObj.SetActive(true);
        obstacle.enabled = true;

        //audio
        MultiSound msnd = GetComponent <MultiSound>();

        if (msnd != null)
        {
            msnd.playSound(1);
        }
    }
Пример #6
0
    private void OpenDoor(bool doSound)
    {
        openObj.SetActive(true);
        closedObj.SetActive(false);
        obstacle.enabled = false;

        //audio
        MultiSound msnd = GetComponent <MultiSound>();

        if (msnd != null && doSound)
        {
            msnd.playSound(0);
        }
    }
Пример #7
0
    private void SwitchOff()
    {
        lightOnObj.SetActive(false);
        lightOffObj.SetActive(true);
        Timer.Instance.Add(10, SwitchOn);

        //audio
        MultiSound msnd = GetComponent <MultiSound>();

        if (msnd != null)
        {
            msnd.playSound(1);
        }
    }
Пример #8
0
    //private void OnMouseDown()
    //{
    //    House.Instance.DoClick(this);
    //}

    public void Used()
    {
        Allowed = false;
        SetActive(true);
        Timer.Instance.Add(ReactivateTime, () =>
        {
            SetActive(false);
            Allowed = true;
        });

        // play sound
        MultiSound asrc = GetComponent <MultiSound>();

        if (asrc != null)
        {
            asrc.playSound();
        }
    }
 // 初期化
 void Start()
 {
     // Animatorコンポーネントを取得する
     anim = GetComponent <Animator> ();
     // CapsuleColliderコンポーネントを取得する(カプセル型コリジョン)
     col = GetComponent <CapsuleCollider> ();
     rb  = GetComponent <Rigidbody> ();
     //メインカメラを取得する
     cameraObject = GameObject.FindWithTag("MainCamera");
     // CapsuleColliderコンポーネントのHeight、Centerの初期値を保存する
     orgColHight      = col.height;
     orgVectColCenter = col.center;
     sounds           = GetComponent <MultiSound>();
     isRun            = false;
     isStart          = false;
     anim.SetBool("Rest", true);
     Invoke("StartGame", 6f);
 }
Пример #10
0
 public override void Start(RAIN.Core.AI ai)
 {
     base.Start(ai);
     control   = GameObject.Find("GameControl").GetComponent <GameControlScript> ();
     ctrlSound = GameObject.Find("unitychan_dynamic_locomotion").GetComponent <MultiSound>();
 }