コード例 #1
0
 public IEnumerator PlayAnimation(string AnimationName)
 {
     Debug.Log ("PlayAnimation(): " + AnimationName);
     Anim = gameObject.GetComponent<Animator>();
     Anim.Play(AnimationName,0,0);
     yield return new WaitForSeconds(1.65f) ;
     Anim.StopPlayback();
 }
コード例 #2
0
    //    public GameObject getRagDollGameObject()
    //    {
    //        return rgb;
    //    }
    public IEnumerator PlayPowerAnimationAndInstantiate(string AnimationName, float Power, float Velocity)
    {
        Debug.Log ("PlayPowerAnimationAndInstantiate(): " + AnimationName);
        Anim = gameObject.GetComponent<Animator>();
        Anim.Play(AnimationName,0,0);
        yield return new WaitForSeconds(1.65f) ;
        Anim.StopPlayback();
        GameObject PrisonerToFire = CopSetup.GetNextPrisoner();
        PrisonerToFireFinal = (GameObject)Instantiate(PrisonerToFire, spawnPoint.transform.position, Quaternion.identity);

        //rgb=(GameObject)Instantiate(ragDoll,spawnPoint.transform.position,Quaternion.identity);
        Transform Direction = spawnPoint.transform;
        Component [] rgbs = PrisonerToFireFinal.GetComponentsInChildren(typeof(Rigidbody));
        foreach(Rigidbody rigidBDY in rgbs)
        {
            rigidBDY.AddForce(Direction.forward *  Power);
            rigidBDY.AddForce(Direction.up *  (Velocity));
        }
        cameraMovement.prisonerT = PrisonerToFireFinal.transform.GetChild(1).gameObject;
        cameraMovement.spawned = true;
    }
コード例 #3
0
ファイル: DoorControl.cs プロジェクト: rtrahms/GameDev
	// Use this for initialization
	void Awake () {
		anim = GetComponent<Animator>();	
		anim.StopPlayback ();
		
	}
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     anim = GetComponent<Animator>();
     anim.StopPlayback();
 }
コード例 #5
0
ファイル: VodGiant.cs プロジェクト: charblaze/SoulSynthus
 // Use this for initialization
 void Start()
 {
     pushback = 0.3f;
     worth = 160;
     moveSpeed = 1.5f;
     moveSpeedOriginal = moveSpeed;
     currentHealth = 200;
     maxHealth = 200;
     isStunned = false;
     isMoving = false;
     immunityFrames = false;
     stunDuration = 0;
     player = GameObject.FindGameObjectWithTag("Player");
     //pc = player.GetComponent(typeof(PlayerController)) as PlayerController;
     GameObject sw = this.gameObject.transform.GetChild(0).transform.GetChild(0).transform.GetChild(0).gameObject;
     hitcollider = sw.GetComponent(typeof(BoxCollider2D)) as BoxCollider2D;
     GameObject parent = this.gameObject.transform.GetChild(0).gameObject;
     anm = parent.GetComponent(typeof(Animator)) as Animator;
     hitcollider.enabled = false;
     anm.StopPlayback();
 }
コード例 #6
0
ファイル: Main.cs プロジェクト: valeryjacobs/TIMTLTS
 void Start()
 {
     Application.runInBackground = true;
     anim = GetComponent<Animator>();
     anim.StopPlayback();
 }
コード例 #7
0
ファイル: SEAMONSTER.cs プロジェクト: charblaze/SoulSynthus
    // Use this for initialization
    void Start()
    {
        pushback = 0.2f;
        worth = 5000;
        moveSpeed = 2f;
        moveSpeedOriginal = moveSpeed;
        currentHealth = 1800;
        maxHealth = 2000;
        isStunned = false;
        isMoving = false;
        immunityFrames = false;
        stunDuration = 0;
        candrown = false;
        player = GameObject.FindGameObjectWithTag("Player");
        //pc = player.GetComponent(typeof(PlayerController)) as PlayerController;
        groundslam = transform.GetChild(0).transform.GetChild(0).transform.GetChild(7).gameObject;
        anm = transform.GetChild(0).transform.GetChild(0).gameObject.GetComponent<Animator>();
        laserL = transform.GetChild(0).transform.GetChild(0).transform.GetChild(3).transform.GetChild(0).transform.GetChild(1).gameObject;
        tentacleL = transform.GetChild(0).transform.GetChild(0).transform.GetChild(3).transform.GetChild(0).transform.GetChild(0).gameObject;
        jointL = transform.GetChild(0).transform.GetChild(0).transform.GetChild(3).transform.GetChild(1).gameObject;

        laserM = transform.GetChild(0).transform.GetChild(0).transform.GetChild(4).transform.GetChild(0).transform.GetChild(1).gameObject;
        tentacleM = transform.GetChild(0).transform.GetChild(0).transform.GetChild(4).transform.GetChild(0).transform.GetChild(0).gameObject;
        jointM = transform.GetChild(0).transform.GetChild(0).transform.GetChild(4).transform.GetChild(1).gameObject;

        laserR = transform.GetChild(0).transform.GetChild(0).transform.GetChild(5).transform.GetChild(0).transform.GetChild(1).gameObject;
        tentacleR = transform.GetChild(0).transform.GetChild(0).transform.GetChild(5).transform.GetChild(0).transform.GetChild(0).gameObject;
        jointR = transform.GetChild(0).transform.GetChild(0).transform.GetChild(5).transform.GetChild(1).gameObject;

        groundslam.SetActive(false);
        laserL.SetActive(false);
        laserR.SetActive(false);
        laserM.SetActive(false);
        jointL.SetActive(false);
        jointM.SetActive(false);
        jointR.SetActive(false);
        tentacleL.SetActive(false);
        tentacleR.SetActive(false);
        tentacleM.SetActive(false);

        anm.StopPlayback();
    }