示例#1
0
文件: KeyView.cs 项目: outscal/hitman
        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;
 }