Пример #1
0
        public override void SetController(InteractableController interactableController)
        {
            this.keyController = (KeyController)interactableController;
            KeyTypes keyType = keyController.GetKeyType();

            if (keyType == KeyTypes.BLUE)
            {
                rendrer.material.color = blue;
            }
            else if (keyType == KeyTypes.RED)
            {
                rendrer.material.color = red;
            }
            else if (keyType == KeyTypes.YELLOW)
            {
                rendrer.material.color = yellow;
            }
        }
Пример #2
0
        public void RemoveInteractable(InteractableController interactableController)
        {
            foreach (int i in interactableControllers.Keys)
            {
                if (interactableController == interactableControllers[i])
                {
                    int key = interactableControllers
                              .FirstOrDefault
                              (
                        x => x.Value == interactableControllers[i]
                              ).Key;

                    interactableControllers.Remove(key);
                    interactableController.Destroy();
                    interactableController = null;
                    break;
                }
            }
        }
Пример #3
0
        public override void SetController(InteractableController interactableController)
        {
            this.guardUniformController = (GuardUniformController)interactableController;

            switch (guardUniformController.GetEnemyType())
            {
            case EnemyType.STATIC:
                _renderer.material.mainTexture = staticEnemy;
                break;

            case EnemyType.PATROLLING:
                _renderer.material.mainTexture = petrolEnemy;
                break;

            case EnemyType.ROTATING_KNIFE:
                _renderer.material.mainTexture = knifeEnemy;
                break;

            case EnemyType.SNIPER:
                break;

            case EnemyType.BIDIRECTIONAL:
                _renderer.material.mainTexture = biDirectionalEnemy;
                break;

            case EnemyType.DOGS:
                break;

            case EnemyType.CIRCULAR_COP:
                _renderer.material.mainTexture = circularEnemy;
                break;

            case EnemyType.GUARD_TORCH:
                break;

            case EnemyType.TARGET:
                break;

            default:
                break;
            }
        }
Пример #4
0
 public override void SetController(InteractableController interactableController)
 {
     this.sniperController = (SniperController)interactableController;
 }
Пример #5
0
 public override void SetController(InteractableController interactableController)
 {
     this.rockInteractableController = (RockInteractableController)interactableController;
 }
Пример #6
0
 public override void SetController(InteractableController interactableController)
 {
     this.ambushPlanController = (AmbushPlantController)interactableController;
 }
Пример #7
0
 public void AddInteractable(int nodeID, InteractableController interactableController)
 {
     interactableControllers.Add(nodeID, interactableController);
 }
Пример #8
0
 public virtual void SetController(InteractableController interactableController)
 {
 }
Пример #9
0
 public override void SetController(InteractableController interactableController)
 {
     this.boneInteractableController = (BoneController)interactableController;
 }