void swap(Parameter hitedParameter, Parameter parameterDragged) { if (!hitedParameter.isSameType(parameterDragged)) { return; } TextCollider2D textColliderHited = hitedParameter.GetComponent <TextCollider2D>(); TextCollider2D textColliderInDrag = parameterDragged.GetComponent <TextCollider2D>(); Color c1t1 = textColliderHited.Color; Color c1t0 = new Color(c1t1.r, c1t1.g, c1t1.b, 0); Color c2t1 = textColliderInDrag.Color; Color c2t0 = new Color(c1t1.r, c1t1.g, c1t1.b, 0); EffectManager.AddGameEffect(new ColorChangeEffect(textColliderHited, c1t0, c1t1, GameConstantes.instance.currentTheme.timeOnInstructionSwap)); EffectManager.AddGameEffect(new ColorChangeEffect(textColliderInDrag, c2t0, c2t1, GameConstantes.instance.currentTheme.timeOnInstructionSwap)); hitedParameter.swapWith(parameterDragged); }
public Effect createInstructionFlashEffect(TextCollider2D collider, bool removeAfterEffect) { return(new GradientEffet(collider, this.instructionFlash, this.timeOnInstructionSwap, removeAfterEffect)); }