Ejemplo n.º 1
0
Archivo: Rockjaw.cs Proyecto: wuw94/pon
    // ------------------------------------------------- Impale -------------------------------------------------
    // To execute an ability we
    // create local
    // command to create logic
    // rpc to create image for others
    // to send a command we need authority. authority is only gained through spawn
    public override void Skill1()
    {
        GetComponent <Rigidbody2D>().velocity = Vector2.zero;
        RockjawCrunchView rcv = Instantiate(rockjaw_crunch_view);

        rcv.transform.position = this.attacking_offset.position + transform.rotation * (Vector2.up * 0.5f);
        rcv.transform.rotation = Quaternion.identity;
        CmdMakeRockjawCrunch();
        StartCoroutine(RockjawCrunch());
    }
Ejemplo n.º 2
0
Archivo: Rockjaw.cs Proyecto: wuw94/pon
    private void RpcMakeRockjawCrunch()
    {
        if (player == Player.mine)
        {
            return;
        }
        RockjawCrunchView rcv = Instantiate(rockjaw_crunch_view);

        rcv.GetComponent <SpriteRenderer>().color = this.GetComponent <SpriteRenderer>().color;
        rcv.transform.position = this.attacking_offset.position + transform.rotation * (Vector2.up * 0.5f);
        rcv.transform.rotation = Quaternion.identity;
    }