示例#1
0
    // Enemy 3: MagmaSlug
    public EnemyMagmaSlug(string n, int x, int z, bool state, string cpTag, int cpPoints)
    {
        ename = n;
        position = new Vector3 (x,0,z);
        maxHP = 20;
        curHP = 20;
        moveSpeed = 0.2f;
        armour = 0;
        damage = 1;
        bonus = 10;
        pastState = state;
        debuffList = new ArrayList ();

        // Enemy 3: Magma Slug Initialization
        clist = new CheckpointList (cpTag, cpPoints);
        GameObject magmaPrefab = PrefabFactory.GetMagmaSlugPrefab();
        GameManager.InstantiateModel(magmaPrefab, new Vector3(x,0,z));
        cubeObject = GameObject.Find("Slug(Clone)");
        cubeObject.name = ename;

        if (!pastState){
            GameObject cubeBody = cubeObject.transform.Find("Body").gameObject;
            cubeBody.renderer.material.color = Color.white;
            cubeBody.renderer.material.mainTexture = TextureFactory.GetMagmaFutureTexture();
        }

        animHelper = Time.time;
    }
示例#2
0
    public Enemy(string n, float x, float z, int hp, float ms, int arm, int dam, int bon, bool tZone, Texture [] anim, int s, int maxT, string cpTag, int cpPoints)
    {
        ename = n;
        position = new Vector3 (x,0,z);
        maxHP = hp;
        curHP = hp;
        moveSpeed = ms;

        if (arm > 100){
            armour = 100;
        }
        else {
            armour = arm;
        }

        damage = dam;
        bonus = bon;

        pastState = tZone;

        debuffList = new ArrayList ();

        animate = anim;
        if (animate == null){
            animate = new Texture [1];
        }
        eSize = s;
        maxTex = maxT;
        curTex = 0;

        //path = new ArrayList(pa);
        clist = new CheckpointList (cpTag, cpPoints);

        cubeObject = GameObject.CreatePrimitive(PrimitiveType.Cube);
        cubeObject.name = ename;
        cubeObject.transform.Rotate(0,0,180);
        cubeObject.transform.position = new Vector3(x, 0, z);
        cubeObject.transform.localScale = new Vector3(1f,1f,1f);
        cubeObject.tag = "enemy";

        animHelper = Time.time;
    }
示例#3
0
    // Enemy 1: Merupi
    public EnemyMerupi(string n, int x, int z, bool state, string cpTag, int cpPoints)
    {
        ename = n;
        position = new Vector3 (x,0,z);
        maxHP = 25;
        curHP = 25;
        moveSpeed = 0.5f;
        armour = 0;
        damage = 100;
        bonus = 50;
        pastState = state;
        debuffList = new ArrayList ();

        // Original: enemy.Add(new EnemyMerupi ("Merupi", startX+1, startZ, 50, 0.5f, 0, 5, 50, futureState, merupiTex, 50, maxTex2, "cp", 5));
        // Enemy 1: Merupi Initialization
        clist = new CheckpointList (cpTag, cpPoints);
        GameObject merupiPrefab = PrefabFactory.GetMerupiPrefab();
        GameManager.InstantiateModel(merupiPrefab, new Vector3(x,0,z));
        cubeObject = GameObject.Find("MerupiPrefab(Clone)");
        cubeObject.name = ename;

        animHelper = Time.time;
    }
示例#4
0
 private void Awake()
 {
     CheckpointList = GetComponentInParent <CheckpointList>();
     collider       = GetComponent <CircleCollider2D>();
     Radius         = collider.radius;
 }