public override void Start() { player = GameObject.Find("paris"); playerScript = player.GetComponent <MoveHeinz>(); cameraT = centerPoint.transform; thisScript = GetComponent <MoveHeinz>(); }
void Start() { targetDistance = Vector3.Distance(transform.position, target.transform.position); targetDistanceInitial = targetDistance; GameObject thePlayer = GameObject.Find("paris"); playerScript = thePlayer.GetComponent <MoveHeinz>(); playerScript.OnDrawPadSwitch += switchCameraFreeze; }
public override void UseEffectEnemy(GameObject enemy) { MoveHeinz blockScript = enemy.GetComponent <MoveHeinz>(); if (blockScript.speedMult > 0) { blockScript.speedMult -= speedDamage; blockScript.health -= damage * Time.deltaTime; } }
public void SetPlayer(MoveHeinz boi) { if (boi != null) { origin = boi.gameObject.tag; opposing = origin == "Player"?"Enemy":"Player"; } else { origin = "Enemy"; opposing = origin == "Player"?"Enemy":"Player"; } }
void Start() { dataHolder = new DrawDataHolder(origRes); display = dataHolder.texture; playerScript = GameObject.Find("paris").GetComponent <MoveHeinz>(); transform.position = playerScript.cameraT.position + 2 * playerScript.cameraT.forward; cursor = transform.Find("Cursor"); cursor.localScale = Vector3.zero; trail = cursor.Find("Trail").gameObject.GetComponent <TrailRenderer>(); planeRend = GetComponent <Renderer>(); planeRend.material.color = new Color(0, 0, 0, 0); int xArr = Mathf.Clamp((int)Mathf.Round(((cursor.localPosition.x + 0.8f) / 1.6f) * origRes), 0, origRes - 1); int yArr = Mathf.Clamp((int)Mathf.Round(((cursor.localPosition.y + 0.8f) / 1.6f) * origRes), 0, origRes - 1); currPoint = new Vector2(xArr, yArr); }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == origin || other.gameObject.tag == "Spell") { return; } if (other.gameObject.tag == opposing && other.GetComponent <MoveHeinz>() != null) { Vector3 force = (other.gameObject.transform.position - transform.position).normalized * radius * 200; MoveHeinz playerScript = other.gameObject.GetComponent <MoveHeinz>(); playerScript.health -= radius; if (!other.gameObject.GetComponent <Rigidbody>().isKinematic) { other.gameObject.GetComponent <Rigidbody>().AddForce(force); } else { playerScript.SetKnockbackDirection(transform.position, radius); } } }
public virtual bool EffectValid(MoveHeinz other) { return(true); }
public void SetPlayer(MoveHeinz player) { playerScript = player; gameObject.layer = player.gameObject.layer + 3; }
public virtual void SetPlayer(MoveHeinz boi) { player = boi; origin = boi.gameObject.tag; opposing = origin == "Player"?"Enemy":"Player"; }
public virtual bool NewEffectValid(MoveHeinz other) { return(other.currSpell == null || !other.currSpell.GetComponent <Spell>().going); }
public override bool EffectValid(MoveHeinz other) { return(other.MouseDown()); }
public override bool EffectValid(MoveHeinz other) { return(Input.GetMouseButton(0) && timer < finalTime); }
public override bool NewEffectValid(MoveHeinz other) { attackingDone = !other.attackingPrev; return(attackingDone); }
public override bool EffectValid(MoveHeinz other, float timeSinceUse) { bool playerIsAI = other.charInput.GetType() == typeof(EnemyInput); return((playerIsAI?!other.attackingPrev:other.MouseDown()) && timeSinceUse > coolDownTime); }
public override bool EffectValid(MoveHeinz other, float timeSinceUse) { return /*other.charInput.leftMouseDown&&*/ (timer < finalTime && timeSinceUse > coolDownTime); }
public virtual bool NewEffectValid(MoveHeinz other, float timeSinceUse) { return((other.currSpell == null || !other.currSpell.GetComponent <Spell>().going) && timeSinceUse > coolDownTime); }
public virtual bool EffectValid(MoveHeinz other, float timeSinceUse) { return(timeSinceUse > coolDownTime); }
// Start is called before the first frame update void Start() { player = GameObject.Find("paris").GetComponent <MoveHeinz>(); }
public override bool NewEffectValid(MoveHeinz other, float timeSinceUse) { attackingDone = !other.attackingPrev; return(attackingDone && timeSinceUse > coolDownTime); }