Example #1
0
    void CmdCastedBuff(NetworkInstanceId id, SkillType[] forcekey, int[] forcevalue)
    {
        GameObject b = Instantiate((Object)SkillDebuff, transform.position + Vector3.up * 1, Quaternion.Euler(new Vector3(90.0f, 0.0f, 0.0f))) as GameObject;

        b.GetComponent <IVSkill>().Force = IVSkill.PairToDic(forcekey, forcevalue);
        b.transform.parent = GameObject.Find("Skills").transform;
        b.SetActive(true);

        NetworkServer.Spawn(b);

        RpcCastedBuff(b, id);
    }
Example #2
0
    void CmdSkillAttack(Vector3 dir, Vector3 pos, NetworkInstanceId id, SkillType[] key, int[] value)
    {
        GameObject b = Instantiate((Object)SkillBullet, pos + Vector3.up * 3, Quaternion.Euler(new Vector3(90.0f, 0.0f, 0.0f))) as GameObject;

        b.GetComponent <IVSkill>().Force = IVSkill.PairToDic(key, value);
        b.transform.parent = GameObject.Find("Skills").transform;
        b.SetActive(true);
        NetworkServer.Spawn(b);

        RpcSkillAttack(b, dir, pos, id);
        return;
    }