Example #1
0
    public override void _Ready()
    {
        joint1 = GetNode <Position2D>("Joint1");
        joint2 = joint1.GetNode <Position2D>("Joint2");
        hand   = joint2.GetNode <Position2D>("Hand");

        handSprite    = hand.GetNode <AnimatedSprite>("Sprite");
        handCollision = hand.GetNode <Area2D>("Area2D").GetNode <CollisionShape2D>("CollisionShape2D");
    }
Example #2
0
 public override void _Ready()
 {
     anSprite       = GetNode <Sprite>("Sprite_Raygun");
     raycast        = anSprite.GetNode <RayCast2D>("shoot_ray");
     beam           = GetNode <Sprite>("beam");
     begin          = GetNode <Sprite>("begin");
     end            = GetNode <Position2D>("end");
     particule      = end.GetNode <Particles2D>("explosion");
     raycast.CastTo = new Vector2(RADIUS, raycast.CastTo.y);
     begin.Visible  = false;
     beam.Visible   = false;
 }