void Awake()
 {
     thisTransform = this.transform;
     animator = GetComponent<AnimationSynchronizer>();
     interpolator = GetComponent<NetworkTransformInterpolation>();
     if (interpolator!=null) {
         interpolator.StartReceiving();
     }
 }
Beispiel #2
0
 void Awake()
 {
     thisTransform = this.transform;
     animator      = GetComponent <AnimationSynchronizer>();
     interpolator  = GetComponent <NetworkTransformInterpolation>();
     if (interpolator != null)
     {
         interpolator.StartReceiving();
     }
 }
Beispiel #3
0
    public void SpawnEnemy(int id, NetworkTransform ntransform, string name, int score)
    {
        GameObject playerObj = GameObject.Instantiate(enemyPrefab) as GameObject;

        playerObj.transform.position         = ntransform.Position;
        playerObj.transform.localEulerAngles = ntransform.AngleRotationFPS;
        AnimationSynchronizer animator = playerObj.GetComponent <AnimationSynchronizer>();

        animator.StartReceivingAnimation();

        PlayerScore.Instance.SetScore(name, score);

        Enemy enemy = playerObj.GetComponent <Enemy>();

        enemy.Init(name);

        recipients[id] = playerObj.GetComponent <NetworkTransformReceiver>();
    }
 void Awake()
 {
     controller = GetComponent<CharacterController>();
     animator = GetComponent<AnimationSynchronizer>();
 }
Beispiel #5
0
 void Awake()
 {
     controller = GetComponent <CharacterController>();
     animator   = GetComponent <AnimationSynchronizer>();
 }