예제 #1
0
 public override void Start()
 {
     player       = GameObject.Find("paris");
     playerScript = player.GetComponent <MoveHeinz>();
     cameraT      = centerPoint.transform;
     thisScript   = GetComponent <MoveHeinz>();
 }
예제 #2
0
    void Start()
    {
        targetDistance        = Vector3.Distance(transform.position, target.transform.position);
        targetDistanceInitial = targetDistance;
        GameObject thePlayer = GameObject.Find("paris");

        playerScript = thePlayer.GetComponent <MoveHeinz>();
        playerScript.OnDrawPadSwitch += switchCameraFreeze;
    }
예제 #3
0
    public override void UseEffectEnemy(GameObject enemy)
    {
        MoveHeinz blockScript = enemy.GetComponent <MoveHeinz>();

        if (blockScript.speedMult > 0)
        {
            blockScript.speedMult -= speedDamage;
            blockScript.health    -= damage * Time.deltaTime;
        }
    }
예제 #4
0
 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";
     }
 }
예제 #5
0
    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);
    }
예제 #6
0
 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);
         }
     }
 }
예제 #7
0
파일: Spell.cs 프로젝트: apal1010/HeinzGame
 public virtual bool EffectValid(MoveHeinz other)
 {
     return(true);
 }
예제 #8
0
 public void SetPlayer(MoveHeinz player)
 {
     playerScript     = player;
     gameObject.layer = player.gameObject.layer + 3;
 }
예제 #9
0
파일: Spell.cs 프로젝트: apal1010/HeinzGame
 public virtual void SetPlayer(MoveHeinz boi)
 {
     player   = boi;
     origin   = boi.gameObject.tag;
     opposing = origin == "Player"?"Enemy":"Player";
 }
예제 #10
0
파일: Spell.cs 프로젝트: apal1010/HeinzGame
 public virtual bool NewEffectValid(MoveHeinz other)
 {
     return(other.currSpell == null || !other.currSpell.GetComponent <Spell>().going);
 }
예제 #11
0
 public override bool EffectValid(MoveHeinz other)
 {
     return(other.MouseDown());
 }
예제 #12
0
 public override bool EffectValid(MoveHeinz other)
 {
     return(Input.GetMouseButton(0) && timer < finalTime);
 }
예제 #13
0
 public override bool NewEffectValid(MoveHeinz other)
 {
     attackingDone = !other.attackingPrev;
     return(attackingDone);
 }
예제 #14
0
    public override bool EffectValid(MoveHeinz other, float timeSinceUse)
    {
        bool playerIsAI = other.charInput.GetType() == typeof(EnemyInput);

        return((playerIsAI?!other.attackingPrev:other.MouseDown()) && timeSinceUse > coolDownTime);
    }
예제 #15
0
 public override bool EffectValid(MoveHeinz other, float timeSinceUse)
 {
     return /*other.charInput.leftMouseDown&&*/ (timer < finalTime && timeSinceUse > coolDownTime);
 }
예제 #16
0
 public virtual bool NewEffectValid(MoveHeinz other, float timeSinceUse)
 {
     return((other.currSpell == null || !other.currSpell.GetComponent <Spell>().going) && timeSinceUse > coolDownTime);
 }
예제 #17
0
 public virtual bool EffectValid(MoveHeinz other, float timeSinceUse)
 {
     return(timeSinceUse > coolDownTime);
 }
예제 #18
0
 // Start is called before the first frame update
 void Start()
 {
     player = GameObject.Find("paris").GetComponent <MoveHeinz>();
 }
예제 #19
0
 public override bool NewEffectValid(MoveHeinz other, float timeSinceUse)
 {
     attackingDone = !other.attackingPrev;
     return(attackingDone && timeSinceUse > coolDownTime);
 }