private void NotifyMedkitSeen(MedkitController medkit)
 {
     if (OnMedkitSeen != null)
     {
         OnMedkitSeen(medkit);
     }
 }
 private void NotifyMedkitSightLost(MedkitController medkit)
 {
     if (OnMedkitSightLost != null)
     {
         OnMedkitSightLost(medkit);
     }
 }
Example #3
0
 private void OnMedkitSightLost(MedkitController medkit)
 {
     if (target == medkit.gameObject)
     {
         target = null;
     }
 }
 private void NotifyMedkitPickup(MedkitController medkit)
 {
     if (OnMedkitPickup != null)
     {
         OnMedkitPickup(medkit);
     }
 }
        public void See(MedkitController medkit)
        {
            Debug.Log("I see the medkit!");

            medkitsInSight.Add(medkit);

            NotifyMedkitSeen(medkit);
        }
        public void LooseSightOf(MedkitController medkit)
        {
            Debug.Log("Where's the medkit??");

            medkitsInSight.Remove(medkit);

            NotifyMedkitSightLost(medkit);
        }
        private void OnMedkitPickup(MedkitController medkit)
        {
            health.Heal(medkit.HealthValue);

            var currentMedkit = transform.root.GetComponentInChildren <MedkitController>();

            medkit.ActivateAssociatedSpawner(medkit);
        }
Example #8
0
    public void SetController(MedkitController controller, Quaternion rotation)
    {
        _controller           = controller;
        _controller.OnPickup += OnPickup;
        var transformPosition = new Vector3(_controller.X, _controller.Y, _controller.Z);

        transform.position = transformPosition;
        transform.rotation = rotation;
        gameObject.SetActive(true);
    }
Example #9
0
    private MedkitController CreateMedic(MedkitModelIniter initer)
    {
        var model = new MedKitModel
        {
            id    = ++_id,
            heal  = 10,
            score = 100,
            x     = initer.x,
            y     = initer.y,
            z     = 1
        };
        var medkitController = new MedkitController(model);
        var medkit           = PoolManager.GetObject(PoolsEnum.MEDKIT);

        medkit.GetComponent <MedKit>().SetController(medkitController, transform.rotation);
        return(medkitController);
    }
Example #10
0
 private void OnPickup(MedkitController objcontroller)
 {
     GameEvents.current.HP_CHANGE(_controller.Heal);
     GameEvents.current.SCORE_CHANGE(_controller.Score);
 }
Example #11
0
 private void OnMedkitSightLost(MedkitController medkit)
 {
     target = null;
 }
Example #12
0
 private void OnMedkitPickup(MedkitController medkit)
 {
     medkitSensor.LooseSightOf(medkit);
     campingMedkit = null;
 }
Example #13
0
 private void OnMedkitSeen(MedkitController medkit)
 {
     campingMedkit = medkit.transform.gameObject;
     target        = null;
 }
 public void Pickup(MedkitController medkit)
 {
     NotifyMedkitPickup(medkit);
 }
Example #15
0
 private void InitializeComponent()
 {
     medkit = transform.GetComponentInChildren <MedkitController>();
 }
Example #16
0
 private void OnMedkitPickup(MedkitController medkit)
 {
     medkitSensor.LooseSightOf(medkit);
 }
Example #17
0
 private void OnPickup(MedkitController obj)
 {
     Round();
 }
Example #18
0
 private void OnMedkitSeen(MedkitController medkit)
 {
     target = medkit.transform.gameObject;
 }