예제 #1
0
    public void ShowEffect(Enemy enemy)
    {
        if(Effectt_Prb == null)
        {
            Effectt_Prb = Resources.Load("eft/Gamora/SkillEft_GAMORA30AB") as GameObject;
        }

        GameObject front = Instantiate(Effectt_Prb) as GameObject;
        front.transform.parent = enemy.transform;
        front.transform.localPosition = new Vector3(0,500,-15);

        GameObject behind = Instantiate(Effectt_Prb) as GameObject;
        behind.transform.parent = enemy.transform;
        behind.transform.localPosition = new Vector3(0,500,100);

        effects.Add(front);
        effects.Add(behind);
        if (targets.ContainsKey(enemy.getID())){
            targets[enemy.getID()] = effects.Count-2;
        }
        else{
            targets.Add(enemy.getID(), effects.Count-2);
        }

        PackedSprite ps = front.GetComponent<PackedSprite>();
        ps.Color = new Color(ps.Color.r, ps.Color.g,ps.Color.b,0.5f);
    }
예제 #2
0
    public void showEft(Enemy enemy)
    {
        GameObject branchFront = Instantiate(branchFrontPrb) as GameObject;
        GameObject branchBehind = Instantiate(branchBehindPrb) as GameObject;

        float s = 1.5f;

        Vector3 scale = new Vector3(s,s,s);

        branchFront.transform.parent = enemy.transform;
        branchFront.transform.localPosition = new Vector3(0, enemy.model.transform.localPosition.y, -1);
        branchFront.transform.localScale = scale;

        branchBehind.transform.parent = enemy.transform;
        branchBehind.transform.localPosition = new Vector3(0, enemy.model.transform.localPosition.y, 0);;
        branchBehind.transform.localScale = scale;

        List<PackedSprite> branchList = new  List<PackedSprite>();
        branchList.Add(branchFront.GetComponent<PackedSprite>());
        branchList.Add(branchBehind.GetComponent<PackedSprite>());
        this.branchHash[enemy.getID()] = branchList;
    }