void OnDisable()
 {
     targets.Clear();
     if (parentProperties = GetComponentInParent <SpecialProperties>())
     {
         parentProperties.Targets.Clear();
     }
 }
 void Start()
 {
     body        = GetComponent <Rigidbody2D> ();
     anim        = GetComponent <Animator> ();
     sProperties = GetComponent <SpecialProperties>();
     gravity     = body.gravityScale;
     hitbox1.gameObject.SetActive(false);
     hitboxController = hitbox1.GetComponent <HitboxController>();
     healthController = GetComponent <HealthController>();
     if (GameManager.instance.PlayerIsZero)
     {
         heatParticles = GetComponentInChildren <ParticleSystem>();
     }
     if (GameManager.instance.PlayerIsZero)
     {
         heatParticles.gameObject.SetActive(false);
     }
     if (GameManager.instance.playerIsMechaman)
     {
         mechaThrusters = GetComponentInChildren <ParticleSystem>().gameObject;
     }
 }
 void Start()
 {
     GetComponentInParent <PlayerController>();
     parentProperties = GetComponentInParent <SpecialProperties>();
 }
Exemple #4
0
 public ObjectProperty GetSpecialProperty(string name) =>
 SpecialProperties.TryGetValue(name, out var objectProperty) ? objectProperty : null;
Exemple #5
0
 public bool HasSpecialProperty(string name) =>
 SpecialProperties.ContainsKey(name);