public void Start() { theModifierObject = GameObject.Find("Timer"); theGun = GameObject.Find("Weapon"); modifierScript = theModifierObject.GetComponent <ModifierHandler>(); weaponScript = theGun.GetComponent <PlayerWeapon>(); }
public CatField(string name, string type, CatStructureObject value, params Modifier[] modifiers) : base(name, "field", modifiers) { _type = TypeHandler.GetTypeIndex(type); Value = value; if (!ModifierHandler.IsField(Modifiers)) { Modifiers += (int)Modifier.Field; } }
private void Start() { m_PlayerSpriteRenderer = GetComponentInChildren <SpriteRenderer>(); m_Rigidbody2D = GetComponent <Rigidbody2D>(); m_ModifierHandler = ModifierHandler.GetComponent(typeof(ModifierHandler)) as ModifierHandler; m_StartPortal = System.Array.Find(m_ModifierHandler.g_ModifierTriplets, ele => ele.tag == "StartPortal"); //Debug.Log("LOUD AND PROUD: " + m_StartPortal); d_AudioManager = FindObjectOfType <AudioManager>(); d_AudioManager.Play("mystic"); }
public CatMethod(string name, string[] signature, int returnType, string linkClass, int line, params Modifier[] modifiers) : base(name, "method", modifiers) { Signature = signature; ReturnType = returnType; Class = linkClass; Line = line; if (!ModifierHandler.IsMethod(Modifiers)) { Modifiers += (int)Modifier.Method; } }
protected virtual void Initilise() { if (ScriptableAbility) { worldGameObject = Instantiate(ScriptableAbility.AbilityPrefab, transform.position, transform.rotation, transform); SetLayerRecursively(worldGameObject, gameObject.layer); ability = AbilityFactory.Create(this, ScriptableAbility, CharacterBase, worldGameObject, HitAction, AttackEnded); //Create a copy of the Modifiers so this ability has its own instance modifierHandler = new ModifierHandler(Modifiers); } }