Inheritance: Behaviour
コード例 #1
4
	// Use this for initialization
	void Awake () 
    {
        player = GameObject.FindGameObjectWithTag("Player");
        playerControl = player.GetComponent<playerControl>();
        som = gameObject.GetComponent<AudioSource>();
        bala = gameObject.GetComponent<MeshRenderer>();
	}
コード例 #2
1
    // Use this for initialization
    void Start()
    {
        // Script References
        shipGraphics = GetComponent<ShipGraphics>();
        shipPhysicsScript = GetComponent<ShipPhysicsScript>();

        // Component Variables
        cam = GetComponentInChildren<Camera>();
        body = GetComponent<Rigidbody>();
        model = transform.Find("Model").gameObject;
        capsuleCollider = GetComponentInChildren<CapsuleCollider>();
        boxCollider = GetComponentInChildren<BoxCollider>();
        lockSound = GetComponent<AudioSource>();

        // Control Variables
        mouseSensitivity = 8.0f;
        //mouseThreshold = 8.0f;
        //buttonSensitivity = 0.05f;
        //buttonThreshold = 0.05f;

        horTranslation = 0.0f;
        verTranslation = 0.0f;

        enemyNoLock = (Material)Resources.Load("Crosshair");
        enemyLock = (Material)Resources.Load("Crosshair_Enemy");

        trackedObject = null;
        trackingResults = null;
        shootWaitTime = 0.0f;
        targetTime = 0.0f;
        hits = 0;
    }
コード例 #3
0
ファイル: SoundOnShoot.cs プロジェクト: raftelti/flamewars
    void OnShoot()
    {
        gunshot = Resources.Load<AudioClip>("Sounds/gunfire");
        source = GetComponent<AudioSource>();

        source.PlayOneShot(gunshot);
    }
コード例 #4
0
 void Awake()
 {
     if (!audioSource && GetComponent<AudioSource>())
         audioSource = GetComponent<AudioSource>();
     if (lengthWithoutTrailing == 0)
         lengthWithoutTrailing = Mathf.Min (sound.length, soundReverse.length);
 }
コード例 #5
0
	void Start () {
		this.anim1 = this.conversante1.GetComponent<Animator> ();
		this.anim2 = this.conversante2.GetComponent<Animator> ();
		
		this.texto = GameObject.Find ("Dialogo").GetComponent<Text> ();
		
		TextAsset archivo = Resources.Load(this.fichero) as TextAsset;
		this.contenidoFichero = archivo.text;
		this.conversaciones = this.contenidoFichero.Split ('\n');
		this.numConver = 0;
		this.primeraConversacion = true;
		this.siguienteConversacion = false;
		
		this.audioActual = this.gameObject.GetComponent<AudioSource> ();
		//Inicializamos el clip del audio.
		this.audioActual.clip = this.audio1;

		//Registramos la informacion del Analytics
		if (Tracker.T () != null) {
			this.registrarTracker ();
		}

		if (this.fichero == "Transicion1")
			this.anim2.SetBool("contenta", false);
	}
コード例 #6
0
ファイル: CardSFX.cs プロジェクト: kenning/popul-vuh
    void Initialize()
    {
        if (initialized) return;
        initialized = true;

        audioSource = gameObject.GetComponent<AudioSource>();
    }
コード例 #7
0
	void Start ()
    {
        // 各アビリティボタンの親であるMaskをアタッチしているオブジェクトを取得
        attackParentGO = GameObject.Find("Tab_Action").transform.FindChild("Mask").gameObject;
        defenceParentGO = GameObject.Find("Tab_Support").transform.FindChild("Mask").gameObject;
        reactionParentGO = GameObject.Find("Tab_Reaction").transform.FindChild("Mask").gameObject;
        moveParentGO = GameObject.Find("Tab_Move").transform.FindChild("Mask").gameObject;

        // 初期化としてアタックタブをアクティブ化、それ以外のタブを非アクティブ化する
        attackParentGO.SetActive(true);
        defenceParentGO.SetActive(false);
        reactionParentGO.SetActive(false);
        moveParentGO.SetActive(false);

        // 非アクティブタブのテキスト文字色変更のためタブのテキストコンポを取得
        attackTabTextCompo = GameObject.Find("Tab_Action").transform.FindChild("Text").GetComponent<Text>();
        defenceTabTextCompo = GameObject.Find("Tab_Support").transform.FindChild("Text").GetComponent<Text>();
        reactionTabTextCompo = GameObject.Find("Tab_Reaction").transform.FindChild("Text").GetComponent<Text>();
        moveTabTextCompo = GameObject.Find("Tab_Move").transform.FindChild("Text").GetComponent<Text>();
        // 初期化としてアタックタブ以外を灰色にする
        attackTabTextCompo.color = new Color(255, 255, 255);
        defenceTabTextCompo.color = Color.grey;
        reactionTabTextCompo.color = Color.grey;
        moveTabTextCompo.color = Color.grey;

        // オーディオコンポを取得
        audioCompo = GameObject.Find("PlayersParent").transform.FindChild("SEPlayer").gameObject.GetComponent<AudioSource>();
        // TODO 本当はリクワイヤードコンポ属性を使うべき。上手く動いてくれなかったのでとりあえず
        if (null == audioCompo) audioCompo = GameObject.Find("PlayersParent").transform.FindChild("SEPlayer").gameObject.GetComponent<AudioSource>();
    }
コード例 #8
0
    /// <summary>
    /// 
    /// </summary>
    protected virtual void Awake()
    {
        m_Audio = audio;

        // store the first player event handler found in the top of our transform hierarchy
        m_Player = (vp_FPPlayerEventHandler)transform.root.GetComponentInChildren(typeof(vp_FPPlayerEventHandler));
    }
コード例 #9
0
ファイル: Bullets.cs プロジェクト: julianpoy/HackPoly2016
	// Use this for initialization
	void Start () {

		//Get a component reference to the Character's animator component
		animator = GetComponent<Animator>();
		render = GetComponent<SpriteRenderer>();

		//Get the rigid body on the prefab
		bullBody = GetComponent<Rigidbody2D>();

		//Set our bullet strength and speed
		strength = 4;
		speed = 40;

		//Go after our player!
		player = GameObject.Find("Player").GetComponent<Player>();

		//Get our Player current Direction
		if (player.getDirection () > 0 ||
			(player.getDirection() == 0 && player.getLastDirection() > 0 )) {
			animator.SetInteger ("Direction", 1);
			playerRight = true;
		} else {
			playerRight = false;
			animator.SetInteger ("Direction", -1);
		}

		//Play our shooting sound
		shoot = GameObject.Find ("Shoot").GetComponent<AudioSource> ();

			shoot.Play ();

		//Get our camera script
		actionCamera = Camera.main.GetComponent<ActionCamera>();
	}
コード例 #10
0
ファイル: TapCounter.cs プロジェクト: Ankharia/SpeedRun
	void Start () 
    {                
        gmc = GameObject.FindGameObjectWithTag("GameController").GetComponent<Spawner>();
        print(gmc.sprites[gmc.num]);
		/*anim = GameObject.FindGameObjectsWithTag("animation");
		anim.SetActive(false);*/
		skeletonAnimation = GameObject.FindGameObjectWithTag("animation").GetComponent<SkeletonAnimation>();
		skeletonAnimation.enabled = true;
		gmv = GameObject.FindGameObjectWithTag("GameOver");
		cnt = GameObject.FindGameObjectWithTag("animation");
		//gmv.SetActive(false);
		gameOv =GameObject.FindGameObjectWithTag("GameOver").GetComponent<SkeletonAnimation>();
		if(this.gameObject.GetComponent<TapCounter>().enabled){
			skeletonAnimation.state.SetAnimation(0, "tap_amount_in", false);
			skeletonAnimation.state.AddAnimation(0, "tap_amount_loop", true, 0.3f);
		}
		gmv.SetActive(false);
		cnt.SetActive(true);

		/*gmv = GameObject.FindGameObjectWithTag("GameOver");
		cnt = GameObject.FindGameObjectWithTag("animation");
		gmv.SetActive(false);*/
        AudioSource[] sources = GetComponents<AudioSource>();
        tap = sources[0];
        bad = sources[1];
        good = sources[2];

		spw = GameObject.FindGameObjectWithTag("GameController").GetComponent<Spawner>();
		sc = GameObject.FindGameObjectWithTag("Score").GetComponent<ScoreController>();
		scoreCounter.text = "";

	}
コード例 #11
0
ファイル: SoundScript.cs プロジェクト: kkiniaes/Fire-On-Ice
 void Start()
 {
     if (aSource == null)
     {
         aSource = GetComponent<AudioSource>();
     }
 }
コード例 #12
0
 // Use this for initialization
 void Start()
 {
     controlledObj = mechanism.GetComponent<BatteryControlledObject>();
     source = GetComponent<AudioSource>();
     source.loop = true;
     source.clip = insertSound;
 }
コード例 #13
0
 // Use this for initialization
 void Start()
 {
     asource = this.GetComponent<AudioSource>();
     inputDevice = (InputManager.Devices.Count > 0) ? InputManager.Devices[0] : null;
     started_timer = true;
     timer = max_timer;
 }
コード例 #14
0
ファイル: IcosaEnemyBrain.cs プロジェクト: 9/Swordface2.5D
 void Awake()
 {
     rb2d = GetComponent<Rigidbody2D>();
     anim = GetComponent<Animator>();
     aud = GetComponent<AudioSource>();
     jps = transform.GetChild(2).GetComponent<ParticleSystem>();
 }
コード例 #15
0
ファイル: turret.cs プロジェクト: doesNotUnderstand/Cheez_Plz
 // Use this for initialization
 void Start()
 {
     startShooting = false;
     shootingBullet = false;
     audio = GetComponent<AudioSource>();
     //spawnPosition = GetComponent<Transform>().position;
 }
コード例 #16
0
 // Use this for initialization
 void Start()
 {
     lineRend = GetComponent<LineRenderer>();
     endPositionExtended = endPos.localPosition;
     var audios = GetComponents<AudioSource>();
     audio = audios [0];
 }
コード例 #17
0
ファイル: Rim.cs プロジェクト: Beanalby/1GameAMonth13
 void Start()
 {
     audioSource = GetComponent<AudioSource>();
     driver = GameObject.Find("GameDriver") as GameObject;
     shadow = transform.FindChild("RimShadow");
     shadowDistance = (transform.position - shadow.position).magnitude;
 }
コード例 #18
0
ファイル: WhirlwindAttack.cs プロジェクト: Morthalin/TheGame
    void Start()
    {
        animator = GameObject.Find("Player").GetComponent<Animator>();
        if (!animator)
        {
            Debug.LogError("Missing animator!");
        }

        basePlayer = GameObject.Find("Player").GetComponent<BasePlayer>();
        if (!basePlayer)
        {
            Debug.LogError("Missing BasePlayer script!");
        }

        audioSource = GameObject.Find("Player").GetComponent<AudioSource>();
        if (!audioSource)
        {
            Debug.LogError("Missing audio source!");
        }

        if (!cooldownIndicator)
        {
            Debug.LogError("Missing cooldown button!");
        }

        if (clip.Length == 0)
        {
            Debug.LogError("0 sounds for attacking!");
        }

        timer = 0f;
        targets = new List<BaseNPC>();
        attacking = false;
    }
コード例 #19
0
	IEnumerator ToggleDoor () {
		m_Audio = audio;
		Debug.Log ("Toggling door");
		if ((moving == false) & (door_open)) {
			Debug.Log ("closing");
			moving = true;
			// play the start sound, if any
			if (SoundCloseDoors != null)
				m_Audio.PlayOneShot(SoundCloseDoors);
			door.transform.Find ("Door_Top").animation.Play ("top_close");
			door.transform.Find ("Door_Bot").animation.Play ("bot_close");
			yield return new WaitForSeconds(2);
			IsClose();
		} else if ((moving == false) & (door_open == false)) {
			Debug.Log ("opening");
			moving = true;
			// play the start sound, if any
			if (SoundCloseDoors != null)
				m_Audio.PlayOneShot(SoundCloseDoors);
			door.transform.Find ("Door_Top").animation.Play ("top_open");
			door.transform.Find ("Door_Bot").animation.Play ("bot_open");
			yield return new WaitForSeconds(2);
			IsOpen();
		}
	}
コード例 #20
0
ファイル: DropSomething.cs プロジェクト: wlots/Klaustrofobia
    void Start()
    {
        audioSou = GetComponent<AudioSource> ();
        fixedVol = audioSou.volume;

        player = GameObject.FindGameObjectWithTag ("Player");
    }
コード例 #21
0
ファイル: Intro.cs プロジェクト: kersseliM/syysjamit2015
 void a0()
 {
     audioSource = GetComponent<AudioSource>();
     audioSource.Play();
     Invoke("d", 2.1f);
     Invoke("a1", 10);
 }
コード例 #22
0
ファイル: Player.cs プロジェクト: PythagoRascal/DogmaDerby
    protected override void Awake()
    {
        base.Awake();

        State = PlayerState.Normal;
        _audioSource = GetComponent<AudioSource>();
    }
コード例 #23
0
	void Awake(){

        audio = this.gameObject.AddComponent<AudioSource>();
        audio.playOnAwake = false;
        audio.loop = false;


		my_transform = this.gameObject.GetComponent<Transform> ();
		move_enemy = my_transform.Find ("ob");
		if(move_enemy == null){
			Debug.Log("move_enemy is null");
		}
		player = move_enemy.Find("fast_move_enemy").gameObject.GetComponent<Animator>();
		
		up_check = my_transform.Find ("up_check");
		down_check = my_transform.Find ("down_check");
		left_check = my_transform.Find ("left_check");
		right_check = my_transform.Find ("right_check");
		
		
		if (stand_direction == 1) {
			player.CrossFade ("stand", 0);
		} else if (stand_direction == 2) {
			player.CrossFade ("down",0);
		}else if (stand_direction == 3) {
			player.CrossFade ("left_stand",0);
		}else if (stand_direction == 4) {
			player.CrossFade ("right_stand",0);
		}
		
		
	}
コード例 #24
0
ファイル: Elevator.cs プロジェクト: tanjera/infirmary
    void Awake()
    {
        thisAudio = GetComponent<AudioSource>();

        origPosition_L = doorLeft.localPosition;
        origPosition_R = doorRight.localPosition;
    }
コード例 #25
0
ファイル: AudioAtDay.cs プロジェクト: Drenerdo/projectspark
    protected void Start()
    {
        audioComponent = GetComponent<AudioSource>();
        audioVolume    = audioComponent.volume;

        audioComponent.enabled = TOD_Sky.Instance.IsDay;
    }
コード例 #26
0
ファイル: MicInput.cs プロジェクト: sw5813/VRConference
	public void Start(){ 
		audio = GetComponent<AudioSource> ();
		if (GetComponent<PhotonView> ().isMine) {
			c = Microphone.Start (null, true, 100, freq);
			while(Microphone.GetPosition(null) < 0) {}
		}
	}
コード例 #27
0
ファイル: PlayerHealth.cs プロジェクト: chris-chris/Chapter6
 void Awake()
 {
     anim = GetComponent <Animator> ();
     playerAudio = GetComponent <AudioSource> ();
     playerMovement = GetComponent <PlayerMovement> ();
     currentHealth = startingHealth;
 }
コード例 #28
0
    void Start()
    {
        player = GetComponent<Player>();
		audioSource = GetComponent<AudioSource>();
		quadRenderer = GetComponentInChildren<Renderer>();
		startColor = quadRenderer.material.color;

        victoryText.text = "";
        health = 100;
     	
		if(winCount == null) {
			winCount = new int[2];
			winCount[0] = 0;
			winCount[1] = 0;
		}

        deadNow = false;
        if (winCount[player.number] > 0)
        {

            winCountText.text = winCount[player.number].ToString();
            winCountText.text += winCount[player.number] == 1 ? " WIN" : " WINS";
            winCountText.gameObject.SetActive(true);
        }
        Debug.Log("Player " + player.number + "win count = " + winCount[player.number]);
    }
コード例 #29
0
ファイル: SpawnTree.cs プロジェクト: Ulkan/GLowPod
 // Use this for initialization
 void Start()
 {
     lightColors = "Blue";
     canShoot = true;
     Cursor.visible = false;
     audio = GetComponent<AudioSource>();
 }
コード例 #30
0
 protected AudioSource getAudioSource()
 {
     if(soundEmitter == null) {
         soundEmitter = GetComponent<AudioSource>();
     }
     return soundEmitter;
 }
コード例 #31
0
 static public int SetSpatializerFloat(IntPtr l)
 {
     try {
         UnityEngine.AudioSource self = (UnityEngine.AudioSource)checkSelf(l);
         System.Int32            a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         var ret = self.SetSpatializerFloat(a1, a2);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #32
0
 static public int GetOutputData(IntPtr l)
 {
     try {
         UnityEngine.AudioSource self = (UnityEngine.AudioSource)checkSelf(l);
         System.Single[]         a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         self.GetOutputData(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #33
0
    static int set_mute(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.mute = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index mute on a nil value"));
        }
    }
コード例 #34
0
    static int set_velocityUpdateMode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource             obj  = (UnityEngine.AudioSource)o;
            UnityEngine.AudioVelocityUpdateMode arg0 = (UnityEngine.AudioVelocityUpdateMode)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioVelocityUpdateMode));
            obj.velocityUpdateMode = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index velocityUpdateMode on a nil value" : e.Message));
        }
    }
コード例 #35
0
 static int Create(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UnityEngine.AudioSource arg0 = (UnityEngine.AudioSource)ToLua.CheckObject(L, 1, typeof(UnityEngine.AudioSource));
         UnityEngine.AudioClip   arg1 = (UnityEngine.AudioClip)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioClip));
         float arg2           = (float)LuaDLL.luaL_checknumber(L, 3);
         AudioPlayOperation o = AudioPlayUtil.Create(arg0, arg1, arg2);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #36
0
    static int get_ignoreListenerPause(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            bool ret = obj.ignoreListenerPause;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ignoreListenerPause on a nil value" : e.Message));
        }
    }
コード例 #37
0
 static int DOFade(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UnityEngine.AudioSource obj = (UnityEngine.AudioSource)ToLua.CheckObject(L, 1, typeof(UnityEngine.AudioSource));
         float arg0            = (float)LuaDLL.luaL_checknumber(L, 2);
         float arg1            = (float)LuaDLL.luaL_checknumber(L, 3);
         DG.Tweening.Tweener o = obj.DOFade(arg0, arg1);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #38
0
    static int set_volume(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.volume = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index volume on a nil value" : e.Message));
        }
    }
コード例 #39
0
    static int get_spread(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            float ret = obj.spread;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index spread on a nil value" : e.Message));
        }
    }
コード例 #40
0
    static int get_mute(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            bool ret = obj.mute;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index mute on a nil value"));
        }
    }
コード例 #41
0
    static int get_priority(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            int ret = obj.priority;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index priority on a nil value"));
        }
    }
コード例 #42
0
    static int get_rolloffMode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource      obj = (UnityEngine.AudioSource)o;
            UnityEngine.AudioRolloffMode ret = obj.rolloffMode;
            LuaDLL.lua_pushinteger(L, (int)ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index rolloffMode on a nil value"));
        }
    }
コード例 #43
0
    static int get_maxDistance(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            float ret = obj.maxDistance;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index maxDistance on a nil value"));
        }
    }
コード例 #44
0
    static int set_pitch(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.pitch = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index pitch on a nil value"));
        }
    }
コード例 #45
0
 static public int GetAmbisonicDecoderFloat(IntPtr l)
 {
     try {
         UnityEngine.AudioSource self = (UnityEngine.AudioSource)checkSelf(l);
         System.Int32            a1;
         checkType(l, 2, out a1);
         System.Single a2;
         var           ret = self.GetAmbisonicDecoderFloat(a1, out a2);
         pushValue(l, true);
         pushValue(l, ret);
         pushValue(l, a2);
         return(3);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #46
0
    public void modle_init()
    {
        canvas = GameObject.Find("Canvas");
        DontDestroyOnLoad(canvas);
        bgaudio = canvas.GetComponent <UnityEngine.AudioSource>();

        //bgaudio.Play ();
        modle       = GameObject.Find("modle");
        selectaudio = modle.GetComponent <UnityEngine.AudioSource> ();
        animator    = modle.GetComponent <Animator> ();

        modelbased = GameObject.Find("modle/SpineBase");

        hand_animator = hand.GetComponent <Animator> ();

        //
    }
コード例 #47
0
    static int set_outputAudioMixerGroup(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource           obj  = (UnityEngine.AudioSource)o;
            UnityEngine.Audio.AudioMixerGroup arg0 = (UnityEngine.Audio.AudioMixerGroup)ToLua.CheckObject <UnityEngine.Audio.AudioMixerGroup>(L, 2);
            obj.outputAudioMixerGroup = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index outputAudioMixerGroup on a nil value"));
        }
    }
コード例 #48
0
    static int get_velocityUpdateMode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource             obj = (UnityEngine.AudioSource)o;
            UnityEngine.AudioVelocityUpdateMode ret = obj.velocityUpdateMode;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index velocityUpdateMode on a nil value"));
        }
    }
コード例 #49
0
    static int set_clip(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj  = (UnityEngine.AudioSource)o;
            UnityEngine.AudioClip   arg0 = (UnityEngine.AudioClip)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioClip));
            obj.clip = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index clip on a nil value"));
        }
    }
コード例 #50
0
    static int get_outputAudioMixerGroup(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource           obj = (UnityEngine.AudioSource)o;
            UnityEngine.Audio.AudioMixerGroup ret = obj.outputAudioMixerGroup;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index outputAudioMixerGroup on a nil value"));
        }
    }
コード例 #51
0
    static int get_rolloffMode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource      obj = (UnityEngine.AudioSource)o;
            UnityEngine.AudioRolloffMode ret = obj.rolloffMode;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index rolloffMode on a nil value" : e.Message));
        }
    }
コード例 #52
0
    static int get_clip(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            UnityEngine.AudioClip   ret = obj.clip;
            ToLua.PushSealed(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index clip on a nil value"));
        }
    }
コード例 #53
0
    static int get_bypassReverbZones(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            bool ret = obj.bypassReverbZones;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bypassReverbZones on a nil value" : e.Message));
        }
    }
コード例 #54
0
 static int SetAmbisonicDecoderFloat(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UnityEngine.AudioSource obj = (UnityEngine.AudioSource)ToLua.CheckObject(L, 1, typeof(UnityEngine.AudioSource));
         int   arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         bool  o    = obj.SetAmbisonicDecoderFloat(arg0, arg1);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #55
0
    static int get_timeSamples(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            int ret = obj.timeSamples;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index timeSamples on a nil value" : e.Message));
        }
    }
コード例 #56
0
 static int GetSpectrumData(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         UnityEngine.AudioSource obj = (UnityEngine.AudioSource)ToLua.CheckObject(L, 1, typeof(UnityEngine.AudioSource));
         float[] arg0 = ToLua.CheckNumberArray <float>(L, 2);
         int     arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         UnityEngine.FFTWindow arg2 = (UnityEngine.FFTWindow)ToLua.CheckObject(L, 4, typeof(UnityEngine.FFTWindow));
         obj.GetSpectrumData(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #57
0
    static int set_bypassReverbZones(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.bypassReverbZones = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bypassReverbZones on a nil value" : e.Message));
        }
    }
コード例 #58
0
    static int set_rolloffMode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource      obj  = (UnityEngine.AudioSource)o;
            UnityEngine.AudioRolloffMode arg0 = (UnityEngine.AudioRolloffMode)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioRolloffMode));
            obj.rolloffMode = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index rolloffMode on a nil value"));
        }
    }
コード例 #59
0
    static int get_audio(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.GameObject  obj = (UnityEngine.GameObject)o;
            UnityEngine.AudioSource ret = obj.audio;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index audio on a nil value" : e.Message));
        }
    }
コード例 #60
0
    static int set_ignoreListenerPause(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.AudioSource obj = (UnityEngine.AudioSource)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.ignoreListenerPause = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ignoreListenerPause on a nil value" : e.Message));
        }
    }